<div class="box">
  <div class="box-header">
      
    <div class="row">
        <div class="col-sm-4">
            <ob_link><a class="btn" href="{:url('videoAdd')}"><i class="fa fa-plus"></i> 新 增</a></ob_link>
        </div>
        
        <div class="col-sm-8">
            <div class="box-tools search-form pull-right">
                <div class="input-group input-group-sm">
                    
                    <input type="text" name="search_data" style="width: 200px;" class="form-control pull-right" value="{:input('search_data')}" placeholder="请输入视频名称搜索">

                    <div class="input-group-btn">
                      <button type="button" id="search"  url="{:url('videolist')}" class="btn btn-info btn-flat"><i class="fa fa-search"></i></button>
                    </div>

                </div>
           </div>
        </div>
    </div>

  </div>
  <div class="box-body table-responsive">
    <table  class="table table-bordered table-hover">
      <thead>
      <tr>
          <th>名称</th>
          <th>分类</th>
          <th>封面</th>
          <th>播放量</th>
          <th>预览</th>
          <th>发布时间</th>
          <th>操作</th>
      </tr>
      </thead>
      
      {notempty name='list'}
        <tbody>
            {volist name='list' id='vo'}
                <tr>
                  <td>{$vo.name}</td>
                  <td>{$vo.category_name}</td>
                  <td>
                      <img style="height: 60px;"  src="{$vo.cover_id|get_picture_url}"/>
                  </td>
                  <td>{$vo.play_number}</td>
                  <td><a  href="javascript:;" url="{$vo.file_url}" onclick="playVideo(this)">播放视频</a></td>
                  <td>{$vo.create_time}</td>
                  <td class="col-md-2 text-center">
                      <ob_link><a href="{:url('videoEdit', array('id' => $vo['id']))}" class="btn "><i class="fa fa-edit"></i> 编辑</a></ob_link>
                      <ob_link><a class="btn confirm ajax-get" href="{:url('setStatus', array('ids' => $vo['id'], 'status' => $Think.DATA_DELETE))}"><i class="fa fa-trash-o"></i> 删 除</a></ob_link>
                  </td>
                </tr>
            {/volist}
        </tbody>
        {else/}
        <tbody><tr class="odd"><td colspan="6" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
      {/notempty}
    </table>
  </div>
  <div class="box-footer clearfix text-center">
      {$list->render()}
  </div>
</div>


<script>
    
    function playVideo(obj)
    {
        window.open($(obj).attr('url'));
    }
    
</script>